# i. 学生类
class Student:
    def __init__(self, student_id, name, age, gender, height, weight, score, address, phone):
        self.student_id = student_id
        self.name = name
        self.age = age
        self.gender = gender
        self.height = height
        self.weight = weight
        self.score = score
        self.address = address
        self.phone = phone

    def study(self, hours):
        print(f"{self.name}学习了{hours}小时")

    def play_game(self, game_name):
        print(f"{self.name}正在玩{game_name}")

    def program(self, lines):
        print(f"{self.name}编写了{lines}行代码")

    def sum_numbers(self, *args):
        return sum(args)


# ii. 车类
class Car:
    def __init__(self, model, wheels, color, weight, fuel_capacity):
        self.model = model
        self.wheels = wheels
        self.color = color
        self.weight = weight
        self.fuel_capacity = fuel_capacity

    def run(self, function):
        print(f"{self.model}正在{function}")


# iii. 笔记本类
class Laptop:
    def __init__(self, model, standby_time, color, weight, cpu, memory, hard_drive):
        self.model = model
        self.standby_time = standby_time
        self.color = color
        self.weight = weight
        self.cpu = cpu
        self.memory = memory
        self.hard_drive = hard_drive

    def play_game(self, game_name):
        print(f"{self.model}正在运行{game_name}")

    def work(self):
        print(f"{self.model}正在进行办公")


# iv. 猴子类
class Monkey:
    def __init__(self, category, gender, body_color, weight):
        self.category = category
        self.gender = gender
        self.body_color = body_color
        self.weight = weight

    def make_fire(self, material):
        print(f"{self.category}正在用{material}造火")

    def learn(self, *things):
        print(f"{self.category}正在学习{', '.join(things)}")


# 测试代码
if __name__ == "__main__":
    # 测试学生类
    student = Student("001", "张三", 20, "男", 175, 65, 90, "北京市", "13800001111")
    student.study(3)
    student.play_game("王者荣耀")
    print(f"求和结果: {student.sum_numbers(1, 2, 3, 4, 5)}")

    # 测试车类
    ferrari = Car("法拉利", 4, "红色", 1500, 80)
    bmw = Car("宝马", 4, "黑色", 1800, 70)
    suzuki = Car("铃木", 4, "白色", 1200, 45)
    wuling = Car("五菱", 4, "银色", 1100, 50)
    tractor = Car("拖拉机", 4, "绿色", 2000, 60)

    ferrari.run("赛车")
    tractor.run("耕地")

    # 测试笔记本类
    laptop = Laptop("MacBook Pro", "20小时", "银色", "1.8kg", "M2", "16GB", "512GB SSD")
    laptop.play_game("英雄联盟")
    laptop.work()

    # 测试猴子类
    monkey = Monkey("金丝猴", "雄", "金色", 15)
    monkey.make_fire("木棍")
    monkey.learn("使用工具", "识别食物")